import { ObjCreate } from "../../common/ObjCreate";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { Language } from "../../../../../extend/language/Language";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
type int = number;
//class NewBattlefieldSparkMaxCell
    
    export  class NewBattlefieldSparkMaxCell /* flash.display.Sprite */
    {
        constructor(arg1: string, arg2: string, arg3: Boolean)
        {
            
            this.init();
            this._strBmpTextName = arg1;
            this._strText = arg2;
            this._isShowPer = arg3;
            return;
        }

        /* internal  */init(): void
        {
            this._bg = new Object /* flash.display.Bitmap */();
            ObjCreate.setObjAttri(this._bg, 0, 0, -1, -1, this);
            var loc1=GlobalStyle.textFormat6;
            loc1.align = flash.text.TextFormatAlign.CENTER;
            loc1.leading = 5;
            this._tfLevel = ObjCreate.createTextField(Language.getStringByParam(41673, "0"), 14, 14, 73, 20, this, loc1);
            this._bmpText = new Object /* flash.display.Bitmap */();
            ObjCreate.setObjAttri(this._bmpText, 15, 31, -1, -1, this);
            this._txt = ObjCreate.createTextField("", 14, 54, 73, 40, this, loc1);
            this._txt.multiline = true;
            this._txt.wordWrap = true;
            LoaderHelp.addResCallBack(ResFileConst.newBFSparkMax, this.resCompl);
            return;
        }

        /* internal  */resCompl(): void
        {
            this._bg.bitmapData = GlobalClass.getBitmapData(ImagesConst.sparkMaxCellBg);
            this._bmpText.bitmapData = GlobalClass.getBitmapData(this._strBmpTextName);
            return;
        }

        public updateLevel(arg1: int, arg2: string): void
        {
            this._tfLevel.text = Language.getStringByParam(41673, arg1.toString());
            this._txt.htmlText = this._strText + "<br>" + arg2;
            return;
        }

        /* internal */ /* var */_strBmpTextName: string;

        /* internal */ /* var */_strText: string;

        /* internal */ /* var */_isShowPer: Boolean;

        /* internal */ /* var */_bg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_tfLevel: Object /* flash.text.TextField */;

        /* internal */ /* var */_bmpText: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_txt: Object /* flash.text.TextField */;
    }
